home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Freeware 1999 November
/
SGI Freeware 1999 November - Disc 2.iso
/
dist
/
fw_IZzip.idb
/
usr
/
freeware
/
src
/
zip
/
msdos
/
makefile.msc.z
/
makefile.msc
Wrap
Makefile
|
1997-09-09
|
4KB
|
147 lines
# Makefile for Zip, ZipCloak, ZipNote and ZipSplit for
# Microsoft C 5.1 or 6.0.
# To use, do "make makefile.msc"
# Add -DSMALL_MEM or -DMEDIUM_MEM to CFLAGS if you wish to reduce the memory
# requirements. Add -DNO_ASM to CFLAGS and remove match.obj from OBJI if
# you do not have masm.
# ------------- Microsoft C 5.1 or 6.0 -------------
MODEL=-AL
FP=
CFLAGS=-W3 -Ox -nologo $(MODEL) $(FP) -DDYN_ALLOC
SPECFLAGS=-W3 -Oaict -Gs -nologo $(MODEL) $(FP) -DDYN_ALLOC
UTILFLAGS=-DUTIL $(CFLAGS) -Fo
CC=cl
LD=link
LDFLAGS=/e/st:0x1000
# If you use lzexe as recommended, remove /e from LDFLAGS
AS=masm
ASFLAGS=-ml -t -D__LARGE__ -DDYN_ALLOC
# For MSC 6.0, use:
#AS=ml
#ASFLAGS=-c -D__LARGE__ -DDYN_ALLOC
# Supress -DDYN_ALLOC in ASFLAGS if you have suppressed it in CFLAGS
# ------------- Common declarations:
STRIP=rem
# If you don't have lzexe, get it (by ftp on wuarchive.wustl.edu
# in /mirrors/msdos/filutl/lzexe91e.zip). Then define:
#STRIP=lzexe
# Or if you've registered PKLITE, then define:
#STRIP=pklite
# This makes a big difference in .exe size (and possibly load time)
# ------------- Used by install rule
# set BIN to the directory you want to install the executables to
BIN = c:\util
# variables
OBJZ = zip.obj zipfile.obj zipup.obj fileio.obj util.obj globals.obj crypt.obj
OBJI = deflate.obj trees.obj bits.obj match.obj
# remove match.obj if you do not have masm
OBJU = zipfile_.obj zipup_.obj fileio_.obj util_.obj globals.obj
OBJN = zipnote.obj $(OBJU)
OBJC = zipcloak.obj $(OBJU) crypt_.obj
OBJS = zipsplit.obj $(OBJU)
ZIPS = zip.exe zipnote.exe zipsplit.exe zipcloak.exe
zips: $(ZIPS)
zip.obj: zip.h ziperr.h tailor.h revision.h zip.c
$(CC) -c $(CFLAGS) $*.c
# MSC 5.1 generates bad code on zipfile with -Ox
zipfile.obj: zip.h ziperr.h tailor.h zipfile.c
$(CC) -c $(SPECFLAGS) $*.c
zipup.obj: zip.h ziperr.h tailor.h revision.h zipup.c
$(CC) -c $(CFLAGS) $*.c
fileio.obj: zip.h ziperr.h tailor.h fileio.c
$(CC) -c $(CFLAGS) $*.c
util.obj: zip.h ziperr.h tailor.h util.c
$(CC) -c $(CFLAGS) $*.c
globals.obj: zip.h ziperr.h tailor.h globals.c
$(CC) -c $(CFLAGS) $*.c
deflate.obj: zip.h ziperr.h tailor.h deflate.c
$(CC) -c $(CFLAGS) $*.c
trees.obj: zip.h ziperr.h tailor.h trees.c
$(CC) -c $(CFLAGS) $*.c
bits.obj: zip.h ziperr.h tailor.h bits.c
$(CC) -c $(CFLAGS) $*.c
crypt.obj: zip.h ziperr.h tailor.h crypt.c
$(CC) -c $(CFLAGS) $*.c
zipcloak.obj: zip.h ziperr.h tailor.h revision.h zipcloak.c
$(CC) -c $(CFLAGS) $*.c
zipnote.obj: zip.h ziperr.h tailor.h revision.h zipnote.c
$(CC) -c $(CFLAGS) $*.c
# MSC 5.1 dies on zipsplit with -Ox
zipsplit.obj: zipsplit.c zip.h ziperr.h tailor.h revision.h
$(CC) -c $(SPECFLAGS) $*.c
# MSC 5.1 generates bad code on zipfile with -Ox
zipfile_.obj: zipfile.c zip.h ziperr.h tailor.h
$(CC) -c $(SPECFLAGS) -DUTIL -Fo$@ zipfile.c
zipup_.obj: zipup.c zip.h ziperr.h tailor.h
$(CC) -c $(UTILFLAGS)$@ zipup.c
fileio_.obj: fileio.c zip.h ziperr.h tailor.h
$(CC) -c $(UTILFLAGS)$@ fileio.c
util_.obj: util.c zip.h ziperr.h tailor.h
$(CC) -c $(UTILFLAGS)$@ util.c
crypt_.obj: crypt.c zip.h
$(CC) -c $(UTILFLAGS)$@ crypt.c
match.obj: msdos\match.asm
$(AS) $(ASFLAGS) msdos\match.asm ;
# we must cut the command line to fit in the MS/DOS 128 byte limit:
zip.exe: $(OBJZ) $(OBJI)
echo $(OBJZ)+ > zip.rsp
echo $(OBJI); >> zip.rsp
$(LD) $(LDFLAGS) @zip.rsp
del zip.rsp
$(STRIP) zip.exe
zipcloak.exe: $(OBJC)
echo $(OBJC); > zipc.rsp
$(LD) $(LDFLAGS) @zipc.rsp
del zipc.rsp
$(STRIP) zipcloak.exe
zipnote.exe: $(OBJN)
echo $(OBJN); > zipn.rsp
$(LD) $(LDFLAGS) @zipn.rsp
del zipn.rsp
$(STRIP) zipnote.exe
zipsplit.exe: $(OBJS)
echo $(OBJS); > zips.rsp
$(LD) $(LDFLAGS) @zips.rsp
del zips.rsp
$(STRIP) zipsplit.exe
install: $(ZIPS)
copy /b *.exe $(BIN)
clean:
del *.obj
del *.exe